package com.antkit.mark.ak.gd;

import android.content.Context;
import android.media.MediaPlayer;
import android.view.SurfaceView;

import java.io.IOException;

/**
 * @author Mark
 * @Date on 2019/1/31
 **/
public class XiaoBaiPlayer implements VoicePlayer {
    private static String music_1 = "v4_se1.mp3";
    private static String music_2;
    private static String music_3;
    private int nowMusic;
    @Override
    public void playVoice(Context context,int level, int times) {

        try {
            MediaPlayerManager.getInstance()
                    .init(context.getAssets().openFd(music_1))
                    .setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
                        @Override
                        public void onCompletion(MediaPlayer mp) {

                            mp.start();
                        }
                    }).setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
                @Override
                public void onPrepared(MediaPlayer mp) {



                }
            }).mediaPlayer.prepare();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
